/*    */ package server.maps;
/*    */ 
/*    */ import client.MapleCharacter;
/*    */ import client.MapleClient;
/*    */ import tools.MaplePacketCreator;
/*    */ 
/*    */ public class MapleExtractor
/*    */   extends MapleMapObject
/*    */ {
/*    */   public final int owner;
/*    */   public final int timeLeft;
/*    */   public final int itemId;
/*    */   public final int fee;
/*    */   public final long startTime;
/*    */   public final String ownerName;
/*    */   
/*    */   public MapleExtractor(MapleCharacter owner, int itemId, int fee, int timeLeft) {
/* 18 */     this.owner = owner.getId();
/* 19 */     this.itemId = itemId;
/* 20 */     this.fee = fee;
/* 21 */     this.ownerName = owner.getName();
/* 22 */     this.startTime = System.currentTimeMillis();
/* 23 */     this.timeLeft = timeLeft;
/* 24 */     setPosition(owner.getPosition());
/*    */   }
/*    */   
/*    */   public int getTimeLeft() {
/* 28 */     return this.timeLeft;
/*    */   }
/*    */ 
/*    */   
/*    */   public void sendSpawnData(MapleClient client) {
/* 33 */     client.announce(MaplePacketCreator.makeExtractor(this.owner, this.ownerName, getTruePosition(), getTimeLeft(), this.itemId, this.fee));
/*    */   }
/*    */ 
/*    */   
/*    */   public void sendDestroyData(MapleClient client) {
/* 38 */     client.announce(MaplePacketCreator.removeExtractor(this.owner));
/*    */   }
/*    */ 
/*    */   
/*    */   public MapleMapObjectType getType() {
/* 43 */     return MapleMapObjectType.EXTRACTOR;
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\server\maps\MapleExtractor.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */